package ihistoryApp.dal.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;


@TableName("messages")
@Data
public class Message {
    @TableId(type = IdType.AUTO)
    private Long messageId;

    private Long senderId;

    private Long receiverId;

    private String content;

    private Long timestamp;

    private Boolean isRead;

    @TableField(value = "max(message_id)",insertStrategy = FieldStrategy.NEVER,updateStrategy = FieldStrategy.NEVER)
    private Long maxMessageId;
}